<?php
$this->widget('ext.mylib.widgets.Gridview.DGridView', array(
    'id'           => 'album-grid',
    'dataProvider' => $model->search(),
    'htmlOptions'  => array('class' => 'hastable'),
    'columnGroup' => array(20, 0, 80, 100, 100, 100, 50, 100, 101),
    'columns'    => array(
        array(
            'class'       => 'ext.mylib.widgets.Gridview.DIdColumn',
            'htmlOptions' => array('style' => 'text-align: center;'),
            'header' => 'Stt',
        ),
        'name',
        array(
            'name'   => 'counter',
            'header' => $model->getAttributeLabel('counter'),
            'value'  => 'Yii::app()->format->formatNumberVi($data->counter)',
        ),
        'artist',
        array(
            'name'   => 'composer_id',
            'header' => $model->getAttributeLabel('composer_id'),
            'value'  => '$data->rcomposer->name',
        ),
        array(
            'name'   => 'album_id',
            'header' => $model->getAttributeLabel('album_id'),
            'value'  => '$data->ralbum->name',
        ),
        array(
            'class' => 'ext.mylib.widgets.ActiveColumn.DActiveColumn',
            'name'  => 'activated_flag',
            'url'   => Yii::app()->createUrl('dadmin/cfSongs/toggleActive/id'),
        ),
        array(
            'class'       => 'ext.mylib.widgets.OrderColumn.OrderColumn',
            'header'      => $model->getAttributeLabel('sort_order'),
            'modelClass'  => 'DCfSongs',
            'htmlOptions' => array('style' => 'text-align:center'),
        ),
        array(
            'class' => 'ext.mylib.widgets.Gridview.DButtonColumn',
            'afterDelete' => 'function(){
                showMessage("#message", "' . Yii::t('DadminModule.msg', 'deleted') . '"); 
            }',
        ),
    ),
));
?>
<div class="clearfix"></div>